cmake_minimum_required(VERSION 3.8)
project(learning_interface)

# 默认使用C++17
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 17)
endif()

# 查找依赖
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(sensor_msgs REQUIRED)

# 定义服务接口
rosidl_generate_interfaces(${PROJECT_NAME}
  "srv/GetPointCloud.srv"
  DEPENDENCIES sensor_msgs
)

# 安装接口
install(
  DIRECTORY include/
  DESTINATION include
)

# 导出依赖
ament_export_dependencies(rosidl_default_runtime)
ament_export_dependencies(sensor_msgs)

ament_package()